package com.iseastar.guojiang.util;

import com.shouhuobao.station.R;

import droid.frame.App;
import droid.frame.utils.android.SoundPoolExt;

/**
 * 音频播放器
 *
 * @author coffee<br>
 * 2014年9月20日下午2:29:53
 */
public class SoundPlayer extends SoundPoolExt {
    private static SoundPlayer instance;

    private SoundPlayer() {

    }

    public synchronized static SoundPlayer getInstance() {
        if (instance == null) {
            instance = new SoundPlayer();
        }
        return instance;
    }

    @Override
    protected void putRawResource() {
        // 以下俩是提示音
//		soundMap.put(R.raw.courier_silence, soundPool.load(App.getContext(), R.raw.courier_silence, 1));
//		soundMap.put(R.raw.cancel_order, soundPool.load(App.getContext(), R.raw.cancel_order, 1));
    }

    public void putRawResource(Integer key, Integer value) {
        soundMap.put(key, soundPool.load(App.getContext(), value, 1));
    }

}
